// Author: combacsa@kaist.ac.kr
// http://www.jungol.co.kr/prog/Hanal/hanalView.php?qs_code=140

//#define COMPILE
#ifdef COMPILE

#include <fstream>
using namespace std;

int main() {
    ifstream in("input.txt");
    ofstream out("output.txt");
    int i;
    int sum = 0;
    for (i = 0; i < 20; i++) {
        int j;
        in >> j;
        if (j == 0)
            break;
        sum += j;
    }
    if (i == 0)
        i = 1;
    out << sum << " " << sum / i;
	return 0;
}

#endif
